package org.example.zpqy.bean;

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import lombok.Data;

@Entity
@Data
public class AppleOne {
    @Id
    private String  attribute;
    private Integer apptreeOne;
    private Integer apptreeTwo;
    private Integer apptreeThree;
    private Integer apptreeFour;
    private Integer apptreeFive;
    private Integer apptreeSix;
    private Integer apptreeSeven;
    private Integer apptreeEight;
    private Integer apptreeNine;
    private Integer apptreeTen;
    public Integer getApptreeValue(int index) {
        switch (index) {
            case 1: return apptreeOne;
            case 2: return apptreeTwo;
            case 3: return apptreeThree;
            case 4: return apptreeFour;
            case 5: return apptreeFive;
            case 6: return apptreeSix;
            case 7: return apptreeSeven;
            case 8: return apptreeEight;
            case 9: return apptreeNine;
            case 10: return apptreeTen;
            default: return null;
        }
    }
}
